package com.kayak.weixin.util;

public class WeixinConst {
	//redis前缀
	public static final String WEIXIN_MPID_PREFIX = "weixinmpid_";
	public static final String WEIXIN_MP_ACCESSTOKEN_PREFIX = "wxmpaccesstoken_";
	public static final String WEIXIN_MP_OAUTHACCESSTOKEN_PREFIX = "";
	
	//微信请求地址
	/**
	 * 获取access token
	 */
	public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
	/**
	 * 获取网页授权凭证access token
	 */
	public static final String OAUTH_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
	
	/**
	 * 刷新网页授权凭证
	 */
	public static final String OAUTH_REFRESH_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=APPID&grant_type=refresh_token&refresh_token=REFRESH_TOKEN";

	/**
	 * 通过网页授权获取用户信息
	 */
	public static final String OAUTH_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID";
	/**
	 * 构造网页授权链接，获取code
	 */
	public static final String OAUTH_AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect";
	/**
	 * 发送模板消息
	 */
	public static final String SEND_TEMPLATE_MSG_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";
	
}
